package gr.atc.epart;

import org.apache.http.HttpHost;

public class EPartSettings
{
  private static EPartSettings _instance = new EPartSettings();

  private static String _backendURL;
  
  private static String _proxyServerAddress;
  private static int _proxyServerPort;;
  
  private static HttpHost _proxyHost;
  private static boolean _proxyIsRequired;
  
  private EPartSettings()
  {
	  // at the moment, everything is hardcoded
	  _backendURL = "hestia.atc.gr/epart";
	  
	  //_backendURL = "10.1.1.33";
	  _proxyIsRequired = false;
	  _proxyServerAddress = "10.1.1.51";
	  _proxyServerPort = 8080;
	  
	  _proxyHost = new HttpHost(_proxyServerAddress, _proxyServerPort);
  }
  
  public static EPartSettings getInstance()
  {
	return _instance;  
  }
  
  public boolean  isProxyServerRequired()
  {
	  return _proxyIsRequired;
  }
  
  public void setProxyIsRequired(boolean required)
  {
	  _proxyIsRequired = required;
  }
  
  public HttpHost getProxyServer()
  {
		return _proxyHost;
  }
  
  public void setBackEndURL(String url)
  {
	  _backendURL = url; 
  }
  
  public String getBackEndURL()
  {
	  return _backendURL; 
  }
}
